I've recently noticed the console not working. I really don't know why
it's not, I haven't mess with any of the settings. I haven't used
Firebug in awhile, but it has happened ever since I've updated. Any
idea if I'm doing something wrong or if it's wrong?
It always says 'console is not defined' when I use console.log()
On Nov 14, 3:37 am, Dave <buttonst...@gmail.com> wrote:
> I've recently noticed the console not working. I really don't know why
> it's not, I haven't mess with any of the settings. I haven't used
> Firebug in awhile, but it has happened ever since I've updated. Any
> idea if I'm doing something wrong or if it's wrong?
> It always says 'console is not defined' when I use console.log()
> Please help.
Well you didn't give enough information for us to help you. Perhaps
you installed a Firefox extension or changed an option since it
worked?
I often get this message when i try to use firebug. The way i often
get round it is to type in "console.debug(' ')" into the script
section and run it. I do this before the console.log or console.debug
gets called. if i then get a message saying its doesn't work i
refresh the browser
On Nov 14, 6:21 pm, John J Barton <johnjbar...@johnjbarton.com> wrote:
> On Nov 14, 3:37 am, Dave <buttonst...@gmail.com> wrote:
> > I've recently noticed the console not working. I really don't know why
> > it's not, I haven't mess with any of the settings. I haven't used
> > Firebug in awhile, but it has happened ever since I've updated. Any
> > idea if I'm doing something wrong or if it's wrong?
> > It always says 'console is not defined' when I use console.log()
> > Please help.
> Well you didn't give enough information for us to help you. Perhaps
> you installed a Firefox extension or changed an option since it
> worked?
<html>
<body onload="javascript:onLoad();">
<script>
function onTimeout() {
location.reload(true);
}
function onLoad() {
if (console && typeof console.log == "function") console.log("Hello
world");
// switch to a different tab then allow the timer to expire.
// it will die with javascript error here.
// Next statement will never execute and the page will stop
reloading! -- BUG
Firefox does not fire 'onLocationChange' for the hidden tab, so
Firebug does not know that the page changed and thus does not include
the console for it.
I'm checking with Firefox team, but my guess is that we can't fix this
for Firebug 1.5. We need either to reimplement the console (schedule
for Firebug 1.7) or get a different way to know about the page change
(Firefox 3.7?).
jjb
On Nov 24, 12:32 pm, kamenjar <nikol...@gmail.com> wrote:
> function onLoad() {
> if (console && typeof console.log == "function") console.log("Hello
> world");
> // switch to a different tab then allow the timer to expire.
> // it will die with javascript error here.
> // Next statement will never execute and the page will stop
> reloading! -- BUG
I understand that there may be technical issues that revolve around
the browser, but the fact that this breaks all my code that uses
console and no way for me to protect against it is a problem. I mean,
console is not defined -- fine, but how should I write my code so it
doesn't error out? I thought that if(console) was safe enough check.
On Nov 25, 9:13 am, kamenjar <nikol...@gmail.com> wrote:
> I understand that there may be technical issues that revolve around
> the browser, but the fact that this breaks all my code that uses
> console and no way for me to protect against it is a problem. I mean,
> console is not defined -- fine, but how should I write my code so it
> doesn't error out? I thought that if(console) was safe enough check.
Oh, then check for 'window.console':
if (window.console && typeof console.log == "function")
console.log("Hello world");
Sadly the expression
if (console)
fails at compile time.
Ok I learned from the Firefox team that we can probably solve the
problem of the console not being injected by replacing our
addProgressListener with a addTabsProgressListener. Maybe I'll
remember this...
jjb
On Nov 25, 9:13 am, kamenjar <nikol...@gmail.com> wrote:
> I understand that there may be technical issues that revolve around
> the browser, but the fact that this breaks all my code that uses
> console and no way for me to protect against it is a problem. I mean,
> console is not defined -- fine, but how should I write my code so it
> doesn't error out? I thought that if(console) was safe enough check.